class Insertion:

        def __init__(self, A):
                self.A = A

        def insertion_sort (self):
                for j in range (0, len(self.A)): 
                        key = self.A[j]
                        i = j - 1
                        while i >= 0 and self.A[i] > key:
                                self.A[i+1] = self.A[i]
                                i-=1
                        self.A[i+1] = key


